/*
 * Observable.h
 *
 *  Created on: 25 févr. 2012
 *      Author: jed
 */

#ifndef OBSERVABLE_H_
#define OBSERVABLE_H_
#include <iostream>
#include <set>
#include "Observer.h"
using namespace std;

class Observable {
	static Observable* instance;
	set<Observer*> observers;
public:
	Observable();
	virtual ~Observable();
    static Observable* GetInstance();
    void addEventListener(Observer& o);
    void removeEventListener(Observer& o);
    void NotifyObservers();
    void Trigger();
};

#endif /* OBSERVABLE_H_ */


